#ifndef _HCC_ERROR_CODE_MID_SRT_H_
#define _HCC_ERROR_CODE_MID_SRT_H_

#include "ofc/ofc_types.h"
#include "hcc/hcc_error_code.h"
#include "hcc/hcc_error_code_mid.h"

#ifdef __cplusplus
extern "C" {
#endif

// 不含行号的错误码生成
#define HCC_MAKE_MID_SRT_ERROR(error_code) (int)HCC_MAKE_MID_WARE_ERROR(kHccMidWareSrt, error_code, HCC_ERROR_LEVEL_ERROR)
// 含行号的错误码生成
#define HCC_MAKE_MID_SRT_ERROR_LINE(error_code) (int)HCC_ERROR(HCC_MAKE_MID_WARE_ERROR(kHccMidWareSrt, error_code, HCC_ERROR_LEVEL_ERROR))


/**
 * 属性库:
 */
enum THccMidSrtErrorCodeTag
{
	kHccMidSrtErrorSuccess	=	HCC_ERROR_SUCCESS,			///< 成功,没有错误
	kHccMidSrtErrorInvalidParam	=	HCC_MAKE_MID_SRT_ERROR(1),			///<无效的参数
	kHccMidSrtErrorOutOfRange	=	HCC_MAKE_MID_SRT_ERROR(2),			///<当前存储参数不在指定范围内
	kHccMidSrtErrorOutOfMem	=	HCC_MAKE_MID_SRT_ERROR(3),			///<超出存储范围
	kHccMidSrtErrorNotEnoughOfMem	=	HCC_MAKE_MID_SRT_ERROR(4),			///<读取可变长度时，给的内存不够
	kHccMidSrtErrorIdNotExists	=	HCC_MAKE_MID_SRT_ERROR(5),			///<ID不存在
	kHccMidSrtErrorTypeNotMatch	=	HCC_MAKE_MID_SRT_ERROR(6),			///<类型不匹配
	kHccMidSrtErrorNoInit	=	HCC_MAKE_MID_SRT_ERROR(7),			///<存储未初始化
	kHccMidSrtErrorNoTimeStamp	=	HCC_MAKE_MID_SRT_ERROR(8),			///<当前参数不支持时间戳信息
	kHccMidSrtErrorReadDevFailed	=	HCC_MAKE_MID_SRT_ERROR(9),			///<读数据失败
	kHccMidSrtErrorWriteDevFailed	=	HCC_MAKE_MID_SRT_ERROR(10),			///<写数据失败
	kHccMidSrtErrorRestoreFailed	=	HCC_MAKE_MID_SRT_ERROR(11),			///<恢复参数失败
	kHccMidSrtErrorChecksumFailed	=	HCC_MAKE_MID_SRT_ERROR(12),			///<校验失败
	kHccMidSrtErrorLockTimeOut	=	HCC_MAKE_MID_SRT_ERROR(13),			///<加锁超时
	kHccMidSrtErrorTransactionRollback	=	HCC_MAKE_MID_SRT_ERROR(14),			///<事务回滚失败
	kHccMidSrtErrorInfoMemError	=	HCC_MAKE_MID_SRT_ERROR(15),			///<分配内存错误
	kHccMidSrtErrorNoShare	=	HCC_MAKE_MID_SRT_ERROR(16),			///<不支持远程同步
	kHccMidSrtErrorNoKey	=	HCC_MAKE_MID_SRT_ERROR(17),			///<映射表中没有找到对应的KEY
	kHccMidSrtErrorDevNotOpen	=	HCC_MAKE_MID_SRT_ERROR(18),			///<设备未打开
	kHccMidSrtErrorDevOpenFail	=	HCC_MAKE_MID_SRT_ERROR(19),			///<打开设备失败
	kHccMidSrtErrorPropAlreadyLoad	=	HCC_MAKE_MID_SRT_ERROR(20),			///<属性的配置已经载入,无法再次载入,参见:TSrtDevLoadPropFinished
	kHccMidSrtErrorMemAllocFail	=	HCC_MAKE_MID_SRT_ERROR(21),			///<内存分配失败
	kHccMidSrtErrorCmdPending	=	HCC_MAKE_MID_SRT_ERROR(22),			///<命令真正执行中,尚未结束
	kHccMidSrtErrorFail	=	HCC_MAKE_MID_SRT_ERROR(23),			///<一般性错误
	kHccMidSrtErrorNotValue	=	HCC_MAKE_MID_SRT_ERROR(24),			///<无有效值(未曾写过且未配置默认值)
	kHccMidSrtErrorIo	=	HCC_MAKE_MID_SRT_ERROR(25),			///<IO错误
	kHccMidSrtErrorNotSupport	=	HCC_MAKE_MID_SRT_ERROR(26),			///<不支持的操作
	kHccMidSrtErrorBroken	=	HCC_MAKE_MID_SRT_ERROR(27),			///<检测到内存被破坏
	kHccMidSrtErrorTimeout	=	HCC_MAKE_MID_SRT_ERROR(28),			///<属性超时(注:仅应用层使用)

};
typedef enum THccMidSrtErrorCodeTag THccMidSrtErrorCode;


typedef Int32 THccMidSrtErrorCodeLine;
#define kHccMidSrtErrorSuccessLine	HCC_ERROR_SUCCESS	///< 成功,没有错误
#define kHccMidSrtErrorInvalidParamLine	HCC_MAKE_MID_SRT_ERROR_LINE(1)	///<无效的参数
#define kHccMidSrtErrorOutOfRangeLine	HCC_MAKE_MID_SRT_ERROR_LINE(2)	///<当前存储参数不在指定范围内
#define kHccMidSrtErrorOutOfMemLine	HCC_MAKE_MID_SRT_ERROR_LINE(3)	///<超出存储范围
#define kHccMidSrtErrorNotEnoughOfMemLine	HCC_MAKE_MID_SRT_ERROR_LINE(4)	///<读取可变长度时，给的内存不够
#define kHccMidSrtErrorIdNotExistsLine	HCC_MAKE_MID_SRT_ERROR_LINE(5)	///<ID不存在
#define kHccMidSrtErrorTypeNotMatchLine	HCC_MAKE_MID_SRT_ERROR_LINE(6)	///<类型不匹配
#define kHccMidSrtErrorNoInitLine	HCC_MAKE_MID_SRT_ERROR_LINE(7)	///<存储未初始化
#define kHccMidSrtErrorNoTimeStampLine	HCC_MAKE_MID_SRT_ERROR_LINE(8)	///<当前参数不支持时间戳信息
#define kHccMidSrtErrorReadDevFailedLine	HCC_MAKE_MID_SRT_ERROR_LINE(9)	///<读数据失败
#define kHccMidSrtErrorWriteDevFailedLine	HCC_MAKE_MID_SRT_ERROR_LINE(10)	///<写数据失败
#define kHccMidSrtErrorRestoreFailedLine	HCC_MAKE_MID_SRT_ERROR_LINE(11)	///<恢复参数失败
#define kHccMidSrtErrorChecksumFailedLine	HCC_MAKE_MID_SRT_ERROR_LINE(12)	///<校验失败
#define kHccMidSrtErrorLockTimeOutLine	HCC_MAKE_MID_SRT_ERROR_LINE(13)	///<加锁超时
#define kHccMidSrtErrorTransactionRollbackLine	HCC_MAKE_MID_SRT_ERROR_LINE(14)	///<事务回滚失败
#define kHccMidSrtErrorInfoMemErrorLine	HCC_MAKE_MID_SRT_ERROR_LINE(15)	///<分配内存错误
#define kHccMidSrtErrorNoShareLine	HCC_MAKE_MID_SRT_ERROR_LINE(16)	///<不支持远程同步
#define kHccMidSrtErrorNoKeyLine	HCC_MAKE_MID_SRT_ERROR_LINE(17)	///<映射表中没有找到对应的KEY
#define kHccMidSrtErrorDevNotOpenLine	HCC_MAKE_MID_SRT_ERROR_LINE(18)	///<设备未打开
#define kHccMidSrtErrorDevOpenFailLine	HCC_MAKE_MID_SRT_ERROR_LINE(19)	///<打开设备失败
#define kHccMidSrtErrorPropAlreadyLoadLine	HCC_MAKE_MID_SRT_ERROR_LINE(20)	///<属性的配置已经载入,无法再次载入,参见:TSrtDevLoadPropFinished
#define kHccMidSrtErrorMemAllocFailLine	HCC_MAKE_MID_SRT_ERROR_LINE(21)	///<内存分配失败
#define kHccMidSrtErrorCmdPendingLine	HCC_MAKE_MID_SRT_ERROR_LINE(22)	///<命令真正执行中,尚未结束
#define kHccMidSrtErrorFailLine	HCC_MAKE_MID_SRT_ERROR_LINE(23)	///<一般性错误
#define kHccMidSrtErrorNotValueLine	HCC_MAKE_MID_SRT_ERROR_LINE(24)	///<无有效值(未曾写过且未配置默认值)
#define kHccMidSrtErrorIoLine	HCC_MAKE_MID_SRT_ERROR_LINE(25)	///<IO错误
#define kHccMidSrtErrorNotSupportLine	HCC_MAKE_MID_SRT_ERROR_LINE(26)	///<不支持的操作
#define kHccMidSrtErrorBrokenLine	HCC_MAKE_MID_SRT_ERROR_LINE(27)	///<检测到内存被破坏
#define kHccMidSrtErrorTimeoutLine	HCC_MAKE_MID_SRT_ERROR_LINE(28)	///<属性超时(注:仅应用层使用)


#ifdef __cplusplus
}  // extern "C"
#endif

#endif // _HCC_ERROR_CODE_MID_SRT_H_
/**
 * @
 */
